import VueRouter from 'vue-router'
import HomeContianer from './components/tabbar/homecontainer.vue'
import MemberContianer from './components/tabbar/membercontainer.vue'
import SearchContianer from './components/tabbar/searchcontainer.vue'
import ShopContainer from './components/tabbar/shopcarcontainer.vue'
import NewsList from './components/news/newslist.vue'
import Newsinfo from './components/news/newsinfo.vue'
import PhotoList from './components/photos/PhotoList.vue'
// 3. 创建路由对象
var router = new VueRouter({
  routes: [
    {path:'/',redirect:'/home'},
    {path:'/home',component:HomeContianer},
    {path:'/member',component:MemberContianer},
    {path:'/shopcar',component:ShopContainer},
    {path:'/search',component:SearchContianer},
    { path: '/home/newslist', component: NewsList },
    {path:'/home/newsinfo/:id',component:Newsinfo},
    { path: '/home/photolist', component: PhotoList },
  ],
  linkActiveClass:'mui-active'
})

// 把路由对象暴露出去
export default router